<?php

namespace api\user\controller;

class AdminSettingController extends \Aaa\user\controller\AdminSettingController {

    public function beforeIndex() {
        $this->baseField = [
            [
                'field' => 'allowNicknameRepetition',
                'name' => '允许昵称重复',
                'type' => 'switch',
                'options' => ['允许', '不允许'],
            ],
            [
                'field' => 'allowChat',
                'name' => '站内聊天',
                'type' => 'switch',
            ],
            [
                'field' => 'chatPermission',
                'name' => '聊天权限',
                'type' => 'checkbox',
                'options' => [
                    ['name' => '无限制', 'value' => 'always'],
                    ['name' => '商品订单待付款', 'value' => 'goodsOrderStatus0'],
                    ['name' => '商品订单待发货', 'value' => 'goodsOrderStatus1'],
                    ['name' => '商品订单交易中', 'value' => 'goodsOrderStatus2'],
                    ['name' => '商品订单已完成', 'value' => 'goodsOrderStatus3'],
                    ['name' => '商品订单已取消', 'value' => 'goodsOrderStatus4'],
                ],
            ],
            [
                'field' => 'allowPush',
                'name' => 'APP消息推送',
                'type' => 'switch',
            ],
            [
                'field' => 'validate',
                'name' => '认证接口',
                'type' => 'select',
                'options' => [
                    ['name' => '人脸实名认证接口（旗舰版）', 'value' => 'baiduIdentify'],
                    ['name' => '银行卡认证接口', 'value' => 'vbank'],
                ],
            ],
            [
                'name' => '短信通知开关（旗舰版）',
                'type' => 'divider',
            ],
            [
                'field' => 'goodsAdminApprovedNoticeSeller',
                'name' => '商品审核通过',
                'type' => 'switch',
                'remark' => '管理员操作，通知卖家',
            ],
            [
                'field' => 'goodsAdminApprovedNoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsAdminRejectNoticeSeller',
                'name' => '商品审核拒绝',
                'type' => 'switch',
                'remark' => '管理员操作，通知卖家',
            ],
            [
                'field' => 'goodsAdminRejectNoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderBuyerCreateNoticeSeller',
                'name' => '商品下单',
                'type' => 'switch',
                'remark' => '买家操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderBuyerCreateNoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderBuyerSetStatus1NoticeSeller',
                'name' => '商品订单付款',
                'type' => 'switch',
                'remark' => '买家操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderBuyerSetStatus1NoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderSellerSetStatus4NoticeBuyer',
                'name' => '商品订单取消',
                'type' => 'switch',
                'remark' => '卖家操作，通知买家',
            ],
            [
                'field' => 'goodsOrderSellerSetStatus4NoticeBuyerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderBuyerSetStatus4NoticeSeller',
                'name' => '商品订单取消',
                'type' => 'switch',
                'remark' => '买家操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderBuyerSetStatus4NoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus4NoticeSeller',
                'name' => '商品订单取消',
                'type' => 'switch',
                'remark' => '管理操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus4NoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus4NoticeBuyer',
                'name' => '商品订单取消',
                'type' => 'switch',
                'remark' => '管理操作，通知买家',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus4NoticeBuyerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderCronSetStatus4NoticeSeller',
                'name' => '商品订单取消',
                'type' => 'switch',
                'remark' => '超时操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderCronSetStatus4NoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderCronSetStatus4NoticeBuyer',
                'name' => '商品订单取消',
                'type' => 'switch',
                'remark' => '超时操作，通知买家',
            ],
            [
                'field' => 'goodsOrderCronSetStatus4NoticeBuyerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderBuyerApplyRefundNoticeSeller',
                'name' => '商品订单退款',
                'type' => 'switch',
                'remark' => '买家操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderBuyerApplyRefundNoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderBuyerCancelRefundNoticeSeller',
                'name' => '商品订单取消退款',
                'type' => 'switch',
                'remark' => '买家操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderBuyerCancelRefundNoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderSellerAgreeRefundNoticeBuyer',
                'name' => '商品订单同意退款',
                'type' => 'switch',
                'remark' => '卖家操作，通知买家',
            ],
            [
                'field' => 'goodsOrderSellerAgreeRefundNoticeBuyerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderAdminAgreeRefundNoticeSeller',
                'name' => '商品订单同意退款',
                'type' => 'switch',
                'remark' => '管理操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderAdminAgreeRefundNoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderAdminAgreeRefundNoticeBuyer',
                'name' => '商品订单同意退款',
                'type' => 'switch',
                'remark' => '管理操作，通知买家',
            ],
            [
                'field' => 'goodsOrderAdminAgreeRefundNoticeBuyerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderSellerSetStatus2NoticeBuyer',
                'name' => '商品订单发货',
                'type' => 'switch',
                'remark' => '卖家操作，通知买家',
            ],
            [
                'field' => 'goodsOrderSellerSetStatus2NoticeBuyerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus2NoticeSeller',
                'name' => '商品订单发货',
                'type' => 'switch',
                'remark' => '管理操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus2NoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus2NoticeBuyer',
                'name' => '商品订单发货',
                'type' => 'switch',
                'remark' => '管理操作，通知买家',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus2NoticeBuyerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderBuyerSetStatus3NoticeSeller',
                'name' => '商品订单确认收货',
                'type' => 'switch',
                'remark' => '买家操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderBuyerSetStatus3NoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus3NoticeSeller',
                'name' => '商品订单确认收货',
                'type' => 'switch',
                'remark' => '管理操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus3NoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus3NoticeBuyer',
                'name' => '商品订单确认收货',
                'type' => 'switch',
                'remark' => '管理操作，通知买家',
            ],
            [
                'field' => 'goodsOrderAdminSetStatus3NoticeBuyerTemplateCode',
                'name' => '短信模板CODE',
            ],
            [
                'field' => 'goodsOrderBuyerRateNoticeSeller',
                'name' => '商品订单评价',
                'type' => 'switch',
                'remark' => '买家操作，通知卖家',
            ],
            [
                'field' => 'goodsOrderBuyerRateNoticeSellerTemplateCode',
                'name' => '短信模板CODE',
            ],
        ];
    }

}
